3.84 \(\int (a+i a \tan (c+d x))^{5/2} (A+B \tan (c+d x)) \, dx\)

Optimal. Leaf size=141 \[ \frac{4 a^2 (B+i A) \sqrt{a+i a \tan (c+d x)}}{d}-\frac{4 \sqrt{2} a^{5/2} (B+i A) \tanh ^{-1}\left (\frac{\sqrt{a+i a \tan (c+d x)}}{\sqrt{2} \sqrt{a}}\right )}{d}+\frac{2 a (B+i A) (a+i a \tan (c+d x))^{3/2}}{3 d}+\frac{2 B (a+i a \tan (c+d x))^{5/2}}{5 d} \]

[Out]

(-4*Sqrt[2]*a^(5/2)*(I*A + B)*ArcTanh[Sqrt[a + I*a*Tan[c + d*x]]/(Sqrt[2]*Sqrt[a])])/d + (4*a^2*(I*A + B)*Sqrt
[a + I*a*Tan[c + d*x]])/d + (2*a*(I*A + B)*(a + I*a*Tan[c + d*x])^(3/2))/(3*d) + (2*B*(a + I*a*Tan[c + d*x])^(
5/2))/(5*d)

________________________________________________________________________________________

Rubi [A]  time = 0.125664, antiderivative size = 141, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 28, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.143, Rules used = {3527, 3478, 3480, 206} \[ \frac{4 a^2 (B+i A) \sqrt{a+i a \tan (c+d x)}}{d}-\frac{4 \sqrt{2} a^{5/2} (B+i A) \tanh ^{-1}\left (\frac{\sqrt{a+i a \tan (c+d x)}}{\sqrt{2} \sqrt{a}}\right )}{d}+\frac{2 a (B+i A) (a+i a \tan (c+d x))^{3/2}}{3 d}+\frac{2 B (a+i a \tan (c+d x))^{5/2}}{5 d} \]

Antiderivative was successfully verified.

[In]

Int[(a + I*a*Tan[c + d*x])^(5/2)*(A + B*Tan[c + d*x]),x]

[Out]

(-4*Sqrt[2]*a^(5/2)*(I*A + B)*ArcTanh[Sqrt[a + I*a*Tan[c + d*x]]/(Sqrt[2]*Sqrt[a])])/d + (4*a^2*(I*A + B)*Sqrt
[a + I*a*Tan[c + d*x]])/d + (2*a*(I*A + B)*(a + I*a*Tan[c + d*x])^(3/2))/(3*d) + (2*B*(a + I*a*Tan[c + d*x])^(
5/2))/(5*d)

Rule 3527

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(d*
(a + b*Tan[e + f*x])^m)/(f*m), x] + Dist[(b*c + a*d)/b, Int[(a + b*Tan[e + f*x])^m, x], x] /; FreeQ[{a, b, c,
d, e, f, m}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] &&  !LtQ[m, 0]

Rule 3478

Int[((a_) + (b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(a + b*Tan[c + d*x])^(n - 1))/(d*(n - 1)
), x] + Dist[2*a, Int[(a + b*Tan[c + d*x])^(n - 1), x], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 + b^2, 0] && G
tQ[n, 1]

Rule 3480

Int[Sqrt[(a_) + (b_.)*tan[(c_.) + (d_.)*(x_)]], x_Symbol] :> Dist[(-2*b)/d, Subst[Int[1/(2*a - x^2), x], x, Sq
rt[a + b*Tan[c + d*x]]], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 + b^2, 0]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rubi steps

\begin{align*} \int (a+i a \tan (c+d x))^{5/2} (A+B \tan (c+d x)) \, dx &=\frac{2 B (a+i a \tan (c+d x))^{5/2}}{5 d}-(-A+i B) \int (a+i a \tan (c+d x))^{5/2} \, dx\\ &=\frac{2 a (i A+B) (a+i a \tan (c+d x))^{3/2}}{3 d}+\frac{2 B (a+i a \tan (c+d x))^{5/2}}{5 d}+(2 a (A-i B)) \int (a+i a \tan (c+d x))^{3/2} \, dx\\ &=\frac{4 a^2 (i A+B) \sqrt{a+i a \tan (c+d x)}}{d}+\frac{2 a (i A+B) (a+i a \tan (c+d x))^{3/2}}{3 d}+\frac{2 B (a+i a \tan (c+d x))^{5/2}}{5 d}+\left (4 a^2 (A-i B)\right ) \int \sqrt{a+i a \tan (c+d x)} \, dx\\ &=\frac{4 a^2 (i A+B) \sqrt{a+i a \tan (c+d x)}}{d}+\frac{2 a (i A+B) (a+i a \tan (c+d x))^{3/2}}{3 d}+\frac{2 B (a+i a \tan (c+d x))^{5/2}}{5 d}-\frac{\left (8 a^3 (i A+B)\right ) \operatorname{Subst}\left (\int \frac{1}{2 a-x^2} \, dx,x,\sqrt{a+i a \tan (c+d x)}\right )}{d}\\ &=-\frac{4 \sqrt{2} a^{5/2} (i A+B) \tanh ^{-1}\left (\frac{\sqrt{a+i a \tan (c+d x)}}{\sqrt{2} \sqrt{a}}\right )}{d}+\frac{4 a^2 (i A+B) \sqrt{a+i a \tan (c+d x)}}{d}+\frac{2 a (i A+B) (a+i a \tan (c+d x))^{3/2}}{3 d}+\frac{2 B (a+i a \tan (c+d x))^{5/2}}{5 d}\\ \end{align*}

Mathematica [A]  time = 3.01935, size = 236, normalized size = 1.67 \[ \frac{(a+i a \tan (c+d x))^{5/2} (A+B \tan (c+d x)) \left (\frac{(\cos (2 c)-i \sin (2 c)) \sec ^{\frac{5}{2}}(c+d x) ((-5 A+11 i B) \sin (2 (c+d x))+(41 B+35 i A) \cos (2 (c+d x))+35 (B+i A))}{15 (\cos (d x)+i \sin (d x))^2}-4 i \sqrt{2} (A-i B) e^{-3 i (c+d x)} \sqrt{\frac{e^{i (c+d x)}}{1+e^{2 i (c+d x)}}} \sqrt{1+e^{2 i (c+d x)}} \sinh ^{-1}\left (e^{i (c+d x)}\right )\right )}{d \sec ^{\frac{7}{2}}(c+d x) (A \cos (c+d x)+B \sin (c+d x))} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + I*a*Tan[c + d*x])^(5/2)*(A + B*Tan[c + d*x]),x]

[Out]

((((-4*I)*Sqrt[2]*(A - I*B)*Sqrt[E^(I*(c + d*x))/(1 + E^((2*I)*(c + d*x)))]*Sqrt[1 + E^((2*I)*(c + d*x))]*ArcS
inh[E^(I*(c + d*x))])/E^((3*I)*(c + d*x)) + (Sec[c + d*x]^(5/2)*(Cos[2*c] - I*Sin[2*c])*(35*(I*A + B) + ((35*I
)*A + 41*B)*Cos[2*(c + d*x)] + (-5*A + (11*I)*B)*Sin[2*(c + d*x)]))/(15*(Cos[d*x] + I*Sin[d*x])^2))*(a + I*a*T
an[c + d*x])^(5/2)*(A + B*Tan[c + d*x]))/(d*Sec[c + d*x]^(7/2)*(A*Cos[c + d*x] + B*Sin[c + d*x]))

________________________________________________________________________________________

Maple [A]  time = 0.017, size = 141, normalized size = 1. \begin{align*}{\frac{2\,i}{d} \left ( -{\frac{i}{5}}B \left ( a+ia\tan \left ( dx+c \right ) \right ) ^{{\frac{5}{2}}}-{\frac{i}{3}}B \left ( a+ia\tan \left ( dx+c \right ) \right ) ^{{\frac{3}{2}}}a+{\frac{Aa}{3} \left ( a+ia\tan \left ( dx+c \right ) \right ) ^{{\frac{3}{2}}}}-2\,iB\sqrt{a+ia\tan \left ( dx+c \right ) }{a}^{2}+2\,{a}^{2}A\sqrt{a+ia\tan \left ( dx+c \right ) }-2\,{a}^{5/2} \left ( A-iB \right ) \sqrt{2}{\it Artanh} \left ( 1/2\,{\frac{\sqrt{a+ia\tan \left ( dx+c \right ) }\sqrt{2}}{\sqrt{a}}} \right ) \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+I*a*tan(d*x+c))^(5/2)*(A+B*tan(d*x+c)),x)

[Out]

2*I/d*(-1/5*I*B*(a+I*a*tan(d*x+c))^(5/2)-1/3*I*B*(a+I*a*tan(d*x+c))^(3/2)*a+1/3*A*(a+I*a*tan(d*x+c))^(3/2)*a-2
*I*B*(a+I*a*tan(d*x+c))^(1/2)*a^2+2*a^2*A*(a+I*a*tan(d*x+c))^(1/2)-2*a^(5/2)*(A-I*B)*2^(1/2)*arctanh(1/2*(a+I*
a*tan(d*x+c))^(1/2)*2^(1/2)/a^(1/2)))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(d*x+c))^(5/2)*(A+B*tan(d*x+c)),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 1.74943, size = 1223, normalized size = 8.67 \begin{align*} \frac{\sqrt{2}{\left ({\left (160 i \, A + 208 \, B\right )} a^{2} e^{\left (4 i \, d x + 4 i \, c\right )} +{\left (280 i \, A + 280 \, B\right )} a^{2} e^{\left (2 i \, d x + 2 i \, c\right )} +{\left (120 i \, A + 120 \, B\right )} a^{2}\right )} \sqrt{\frac{a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} e^{\left (i \, d x + i \, c\right )} - 15 \, \sqrt{-\frac{{\left (32 \, A^{2} - 64 i \, A B - 32 \, B^{2}\right )} a^{5}}{d^{2}}}{\left (d e^{\left (4 i \, d x + 4 i \, c\right )} + 2 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \log \left (\frac{{\left (\sqrt{2}{\left ({\left (4 i \, A + 4 \, B\right )} a^{2} e^{\left (2 i \, d x + 2 i \, c\right )} +{\left (4 i \, A + 4 \, B\right )} a^{2}\right )} \sqrt{\frac{a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} e^{\left (i \, d x + i \, c\right )} + \sqrt{-\frac{{\left (32 \, A^{2} - 64 i \, A B - 32 \, B^{2}\right )} a^{5}}{d^{2}}} d e^{\left (2 i \, d x + 2 i \, c\right )}\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{{\left (4 i \, A + 4 \, B\right )} a^{2}}\right ) + 15 \, \sqrt{-\frac{{\left (32 \, A^{2} - 64 i \, A B - 32 \, B^{2}\right )} a^{5}}{d^{2}}}{\left (d e^{\left (4 i \, d x + 4 i \, c\right )} + 2 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \log \left (\frac{{\left (\sqrt{2}{\left ({\left (4 i \, A + 4 \, B\right )} a^{2} e^{\left (2 i \, d x + 2 i \, c\right )} +{\left (4 i \, A + 4 \, B\right )} a^{2}\right )} \sqrt{\frac{a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} e^{\left (i \, d x + i \, c\right )} - \sqrt{-\frac{{\left (32 \, A^{2} - 64 i \, A B - 32 \, B^{2}\right )} a^{5}}{d^{2}}} d e^{\left (2 i \, d x + 2 i \, c\right )}\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{{\left (4 i \, A + 4 \, B\right )} a^{2}}\right )}{30 \,{\left (d e^{\left (4 i \, d x + 4 i \, c\right )} + 2 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(d*x+c))^(5/2)*(A+B*tan(d*x+c)),x, algorithm="fricas")

[Out]

1/30*(sqrt(2)*((160*I*A + 208*B)*a^2*e^(4*I*d*x + 4*I*c) + (280*I*A + 280*B)*a^2*e^(2*I*d*x + 2*I*c) + (120*I*
A + 120*B)*a^2)*sqrt(a/(e^(2*I*d*x + 2*I*c) + 1))*e^(I*d*x + I*c) - 15*sqrt(-(32*A^2 - 64*I*A*B - 32*B^2)*a^5/
d^2)*(d*e^(4*I*d*x + 4*I*c) + 2*d*e^(2*I*d*x + 2*I*c) + d)*log((sqrt(2)*((4*I*A + 4*B)*a^2*e^(2*I*d*x + 2*I*c)
 + (4*I*A + 4*B)*a^2)*sqrt(a/(e^(2*I*d*x + 2*I*c) + 1))*e^(I*d*x + I*c) + sqrt(-(32*A^2 - 64*I*A*B - 32*B^2)*a
^5/d^2)*d*e^(2*I*d*x + 2*I*c))*e^(-2*I*d*x - 2*I*c)/((4*I*A + 4*B)*a^2)) + 15*sqrt(-(32*A^2 - 64*I*A*B - 32*B^
2)*a^5/d^2)*(d*e^(4*I*d*x + 4*I*c) + 2*d*e^(2*I*d*x + 2*I*c) + d)*log((sqrt(2)*((4*I*A + 4*B)*a^2*e^(2*I*d*x +
 2*I*c) + (4*I*A + 4*B)*a^2)*sqrt(a/(e^(2*I*d*x + 2*I*c) + 1))*e^(I*d*x + I*c) - sqrt(-(32*A^2 - 64*I*A*B - 32
*B^2)*a^5/d^2)*d*e^(2*I*d*x + 2*I*c))*e^(-2*I*d*x - 2*I*c)/((4*I*A + 4*B)*a^2)))/(d*e^(4*I*d*x + 4*I*c) + 2*d*
e^(2*I*d*x + 2*I*c) + d)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(d*x+c))**(5/2)*(A+B*tan(d*x+c)),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(d*x+c))^(5/2)*(A+B*tan(d*x+c)),x, algorithm="giac")

[Out]

Timed out